package com.monitor.service.impl;

import com.monitor.dao.MessageDao;
import com.monitor.dao.SmsMotionDao;
import com.monitor.po.Message;
import com.monitor.po.SmsMotion;
import com.monitor.service.SmsMotionService;

public class SmsMotionServiceImpl implements SmsMotionService {
	private SmsMotionDao smsMotionDao;
	private MessageDao messageDao;

	@Override
	public void addSmsMotion(long msgId, long clientMsgId, long uid) throws Exception {
		SmsMotion motion = new SmsMotion();
		motion.setClientMsgId(clientMsgId);
		motion.setMsgId(msgId);
		motion.setOwnerUid(uid);
		messageDao.updateMessageDeleteStatus(msgId, Message.STATE_WAITING_DELETING);
		smsMotionDao.addSmsMotion(motion);

	}

	public void setSmsMotionDao(SmsMotionDao smsMotionDao) {
		this.smsMotionDao = smsMotionDao;
	}

	public void setMessageDao(MessageDao messageDao) {
		this.messageDao = messageDao;
	}

}
